package us.wili.dev.model.constants;

public enum SmsCacheKeyEnum {

    /**
     * 短信验证码redis缓存枚举
     */
    NORMAL(SmsCacheKeyEnum.CACHE_KEY_VERRIFY_CODE, "用户常规操作下验证码缓存key"),
    SMS_LOGIN(SmsCacheKeyEnum.CHCHE_KEY_LOGIN, "用户短信登录操作验证码缓存key"),
    REGISTE_USER(SmsCacheKeyEnum.CACHE_KEY_USER_REGISTE_CODE, "用户注册的验证码缓存key"),
    BINDING_PHONE(SmsCacheKeyEnum.CACHE_KEY_PHONE_BINDING_CODE, "用户绑定手机号的验证码key"),
    UNBINDING_PHONE(SmsCacheKeyEnum.CACHE_KEY_PHONE_UNBINDING_CODE, "用户解绑微手机号验证码key"),
    CHANGE_PWD(SmsCacheKeyEnum.CHACHE_KEY_CHANGE_PWD_CODE, "用户修改密码的缓存key");
    /**
     * 用户常规操作下验证码缓存key
     */
    private static final String CACHE_KEY_VERRIFY_CODE = "user.sms.verify.code";

    /**
     * 用户短信登录的验证码缓存key
     */
    private static final String CHCHE_KEY_LOGIN = CACHE_KEY_VERRIFY_CODE + ".login";
    /**
     * 用户绑定手机号的验证码key
     */
    private static final String CACHE_KEY_PHONE_BINDING_CODE = CACHE_KEY_VERRIFY_CODE + ".bindingg.phone";
    /**
     * 用户解绑手机号的验证码key
     */
    private static final String CACHE_KEY_PHONE_UNBINDING_CODE = CACHE_KEY_VERRIFY_CODE + ".unbinding.phone";
    /**
     * 用户注册账号的验证码key
     */
    private static final String CACHE_KEY_USER_REGISTE_CODE = CACHE_KEY_VERRIFY_CODE + ".registe.phone";
    /**
     * 更改密码的redis key
     */
    private static final String CHACHE_KEY_CHANGE_PWD_CODE = CACHE_KEY_VERRIFY_CODE + ".change.pwd";
    /*
     * 相关操作的缓存key
     */
    private String key;
    /**
     * 相关操作的描述
     */
    private String desc;

    SmsCacheKeyEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }


    public String getKey() {
        return key;
    }

    public String getDesc() {
        return desc;
    }
}
